<template>
  <div class="mine-container">
    <img src="../../assets/img/my/my_bg.png" alt="" class="top_img">
    <div class="my_mian">
      <div class="basic_info">
        <div class="basic_info_top">
          <a href="#">
            <img src="../../assets/img/my/defalut_img@2x.d3fb2ad.png" alt="" circle>
            <div class="grade">普通用户</div>
          </a>
          <div class="p_right">
            <img src="../../assets/img/my/center_card_integral.png" class="center_card_integral" data-v-743cb27e="">
            <div class="integral_text">每日签到</div>
          </div>
        </div>
        <div class="top_bar">
          <div class="top_bar_item">
            <img src="../../assets/img/my/icon_my_points.png" alt="">
            <span>我的积分</span>
          </div>
          <div class="top_bar_item">
            <img src="../../assets/img/my/icon_apply_feedback.png" alt="">
            <span>申请反馈</span>
          </div>
          <div class="top_bar_item">
            <img src="../../assets/img/my/icon_my_collect.png" alt="">
            <span>我的收藏</span>
          </div>
          <div class="top_bar_item">
            <img src="../../assets/img/my/icon_my_msg.png" alt="">
            <span>我的消息</span>
          </div>
        </div>
      </div>
      <van-cell is-link @click="go('/serve')">
        <template #title>
          <img src="../../assets/img/my/card.png" mr10>
          <span class="custom-title">我的卡包</span>
        </template>
      </van-cell>
      <van-cell is-link @click="go('/login')">
        <template #title>
          <img src="../../assets/img/my/birthday.png" mr10>
          <span class="custom-title">生日祝福</span>
        </template>
      </van-cell>
      <van-cell is-link @click="go('/grouplist')">
        <template #title>
          <img src="../../assets/img/my/my_club@2x.png" mr10>
          <span class="custom-title">我的社团</span>
        </template>
      </van-cell>
      <van-cell is-link @click="go('/association')">
        <template #title>
          <img src="../../assets/img/my/my_activity.png" mr10>
          <span class="custom-title">我的活动</span>
        </template>
      </van-cell>
      <van-cell is-link>
        <template #title>
          <img src="../../assets/img/my/my_collection.png" mr10>
          <span class="custom-title">我的收藏</span>
        </template>
      </van-cell>
      <van-cell is-link>
        <template #title>
          <img src="../../assets/img/my/my_integral.png" mr10>
          <span class="custom-title">我的积分</span>
        </template>
      </van-cell>
      <van-cell is-link>
        <template #title>
          <img src="../../assets/img/my/exchange.png" mr10>
          <span class="custom-title">积分换购</span>
        </template>
      </van-cell>
      <van-cell is-link @click="go('/mock')">
        <template #title>
          <img src="../../assets/img/my/my_message.png" mr10>
          <span class="custom-title">我的消息</span>
        </template>
      </van-cell>
      <van-cell is-link @click="go('/demo')">
        <template #title>
          <img src="../../assets/img/my/setting.png" mr10>
          <span class="custom-title">项目例子</span>
        </template>
      </van-cell>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    go(path) {
      this.$router.push(path)
    }
  }
}
</script>

<style lang="scss" scoped>
.mine-container {
  width: 100%;
  position: relative;
  .top_img {
    width: 100%;
  }
  .my_mian {
    position: absolute;
    width: 86%;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    .basic_info {
      border-radius: 6px;
      box-shadow: 0 1px 7px rgba(0, 0, 0, 0.2);
      margin-bottom: 10px;
      display: flex;
      flex-direction: column;
      background: #fff;
      padding-bottom: 10px;
      .basic_info_top {
        display: flex;
        padding: 18px;
        position: relative;
        a {
          display: flex;
        }
        img {
          width: 70px;
          height: 70px;
        }
        .grade {
          height: 20px;
          line-height: 20px;
          width: 56px;
          font-size: 12px;
          background: rgba(242,53,53,.1);
          color: #f23535;
          border: 1px solid #f23535;
          border-radius: 4px;
          text-align: center;
          font-weight: 500;
          margin-left: 16px;
          margin-top: 10px;
        }
        .p_right {
          box-sizing: border-box;
          padding-left: 20px;
          display: flex;
          align-items: center;
          width: 95px;
          height: 30px;
          line-height: 30px;
          text-align: center;
          font-size: 12px;
          position: absolute;
          right: 0;
          top: 50%;
          transform: translateY(-50%);
          color: #fff;
          background: url(../../assets/img/my/center_card_bg.png) 50%;
          background-size: 100% 100%;
          .center_card_integral {
            width: 12px;
            height: 12px;
            vertical-align: middle;
          }
          .integral_text {
            vertical-align: middle;
          }
        }
      }
      .top_bar {
        display: flex;
        .top_bar_item {
          flex: 1;
          display: flex;
          flex-direction: column;
          align-items: center;
          img {
            width: 25px;
            height: 25px;
          }
          span {
            color: #333;
            font-size: 12px;
            margin: 10px 0;
          }
        }
      }
    }
    .van-cell {
      text-align: left;
      .van-cell__title {
        display: flex;
        align-items: center;
      }
      img {
        width: 16px;
        height: 16px;
      }
    }
  }
}
</style>
